<template>
    <div class="public-common">
        <!--系统设置-文件共享-->
        <div class="public-title" style="display:flex;"><span style="float:left;width:6em;">当前目录：</span><el-input v-model="directory" disabled></el-input></div>
        <div class="public-searchbox">
            <!-- <el-button type="primary" size="mini" icon="el-icon-search">上传文件</el-button> -->
            <div style="">
                <el-upload
                action="##" accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" :show-file-list="false"
                :on-change="handleChange" style="float:left;margin-right:15px;">
                    <el-button size="mini" type="primary" icon="el-icon-upload2">上传文件</el-button>
                </el-upload>
                <el-button type="primary" size="mini" icon="el-icon-edit-outline">创建目录</el-button>
                <el-button type="warning" size="mini" icon="el-icon-delete">删除文件</el-button>
                <el-button type="warning" size="mini" icon="el-icon-folder">根目录</el-button>
                <el-button type="warning" size="mini" icon="el-icon-back">上级目录</el-button>
            </div>
            
        </div>
        <div class="public-scroll" style="height:calc(100% - 120px)">
        <el-table :data="tabledata" size="mini" border stripe header-row-class-name="textcenter">
            <el-table-column
                type="selection"
                width="55px">
                </el-table-column>
            <el-table-column
                label="日志类别">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>                
            <el-table-column
                label="开始时间">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="耗时(秒)">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="是否成功">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="新增记录数">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="更新记录数">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="错误信息">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="客户端IP">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="登录名">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
        </el-table>
        </div>
        <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="page.now"
        :page-sizes="page.sizes"
        :page-size="page.pagesize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="page.total" style="margin-top:10px;">
        </el-pagination>
        <!--dialog-->
        <el-dialog title="创建目录"  :visible.sync="dialog.isVisible" width="40%" top="20vh">
            <el-form label-width="120px" size="small">
                <el-form-item label="请输入目录名称">
                    <el-input v-model="dialog.filename"></el-input>
                </el-form-item>
                <el-form-item label="">
                    <el-button type="primary">确定</el-button>
                    <el-button type="info" @click="dialog.isVisible = false">取消</el-button>
                </el-form-item>
            </el-form>
        </el-dialog>
    </div>
</template>
<script>
export default {
    data(){
        return {
            directory:'\\',
            form:{
                changevalue:"全部",
                test:'',
                carid:''
            },
            tabledata:[
                {carId:1}
            ],
            page:{
              now:1,
              pagesize:10,
              sizes:[2,10, 20, 50, 100],
              total:0,
              key:''
            },
            select:{
                kinds:[
                ]
            },
            dialog:{
                isVisible:false,
                filename:''
            }
        }
    },
    mounted(){
        
    },
    methods:{
        handleChange(file, fileList){
            console.log("file",file)
        },
        search(){
            alert("search")
        },
        //分页
        handleSizeChange(pagesize){
            this.page.pagesize = pagesize;
            this.search(true,true);
        },
        handleCurrentChange(pageno){
            this.page.now = pageno;
            this.search(true,true);
        }

    }
}
</script>
<style lang="scss">

</style>